package com.system.serviceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.system.dao.UserDao;
import com.system.entity.User;
import com.system.service.UserService;
@Service("userService")
public class UserServiceImpl implements UserService{
@Resource
	private UserDao userDao;
	@Override
	public User queryByUsername(String username) {
		return userDao.queryByUsername(username);
	}
	@Override
	public boolean add(User user) {
		userDao.add(user);
		return true;
	}
	@Override
	public List<User> queryAll() {
		// TODO Auto-generated method stub
		return userDao.queryAll();
	}
	@Override
	public boolean delete(User user) {
		// TODO Auto-generated method stub
		userDao.delete(user);
		return true;
	}
	@Override
	public User queryById(int id) {
		// TODO Auto-generated method stub
		return userDao.queryById(id);
	}
	@Override
	public boolean update(User user) {
		// TODO Auto-generated method stub
		userDao.update(user);
		return true;
	}

}
